{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/components/Name/index.tsx\";\nimport React from \"react\";\nimport { getUserName } from \"../../utils/User\";\nimport \"./Name.scss\";\nimport { Fragment as _Fragment } from \"react/jsx-dev-runtime\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst Name = _ref => {\n  let {\n    chatName,\n    multiChat,\n    user\n  } = _ref;\n  if (chatName && chatName.length > 0 && multiChat) {\n    return /*#__PURE__*/_jsxDEV(_Fragment, {\n      children: chatName\n    }, void 0, false);\n  } else if (!multiChat && user) {\n    return /*#__PURE__*/_jsxDEV(_Fragment, {\n      children: getUserName(user)\n    }, void 0, false);\n  } else {\n    if (user) {\n      return /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"message__name\",\n        children: user.firstName ? /*#__PURE__*/_jsxDEV(\"p\", {\n          className: \"message__name--normalName\",\n          children: user.firstName\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 21,\n          columnNumber: 26\n        }, this) : /*#__PURE__*/_jsxDEV(\"p\", {\n          className: \"message__name--nickname\",\n          children: user.nickname\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 22,\n          columnNumber: 26\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 19,\n        columnNumber: 17\n      }, this);\n    } else {\n      return /*#__PURE__*/_jsxDEV(_Fragment, {}, void 0, false);\n    }\n  }\n};\n_c = Name;\nexport default Name;\nvar _c;\n$RefreshReg$(_c, \"Name\");","map":{"version":3,"names":["React","getUserName","Name","chatName","multiChat","user","length","firstName","nickname"],"sources":["/data/messenger.client/src/components/Name/index.tsx"],"sourcesContent":["import React from \"react\";\nimport {getUserName} from \"../../utils/User\";\nimport {NameProps} from \"../../models/props/NameProps\";\nimport \"./Name.scss\";\n\nconst Name: React.FC<NameProps> = ({chatName, multiChat, user}) => {\n\n    if (chatName && chatName.length > 0 && multiChat) {\n        return (\n            <>{chatName}</>\n        );\n    } else if (!multiChat && user) {\n        return (\n            <>{getUserName(user)}</>\n        );\n    } else {\n        if (user) {\n            return (\n                <div className='message__name'>\n                    {(user.firstName)\n                        ?<p className='message__name--normalName'>{user.firstName}</p>\n                        :<p className='message__name--nickname'>{user.nickname}</p>\n                    }\n                </div>\n            );\n        } else {\n            return (<></>);\n        }\n    }\n}\n\nexport default Name;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,WAAW,QAAO,kBAAkB;AAE5C,OAAO,aAAa;AAAC;AAAA;AAErB,MAAMC,IAAyB,GAAG,QAAiC;EAAA,IAAhC;IAACC,QAAQ;IAAEC,SAAS;IAAEC;EAAI,CAAC;EAE1D,IAAIF,QAAQ,IAAIA,QAAQ,CAACG,MAAM,GAAG,CAAC,IAAIF,SAAS,EAAE;IAC9C,oBACI;MAAA,UAAGD;IAAQ,iBAAI;EAEvB,CAAC,MAAM,IAAI,CAACC,SAAS,IAAIC,IAAI,EAAE;IAC3B,oBACI;MAAA,UAAGJ,WAAW,CAACI,IAAI;IAAC,iBAAI;EAEhC,CAAC,MAAM;IACH,IAAIA,IAAI,EAAE;MACN,oBACI;QAAK,SAAS,EAAC,eAAe;QAAA,UACxBA,IAAI,CAACE,SAAS,gBACX;UAAG,SAAS,EAAC,2BAA2B;UAAA,UAAEF,IAAI,CAACE;QAAS;UAAA;UAAA;UAAA;QAAA,QAAK,gBAC7D;UAAG,SAAS,EAAC,yBAAyB;UAAA,UAAEF,IAAI,CAACG;QAAQ;UAAA;UAAA;UAAA;QAAA;MAAK;QAAA;QAAA;QAAA;MAAA,QAE7D;IAEd,CAAC,MAAM;MACH,oBAAQ,qCAAK;IACjB;EACJ;AACJ,CAAC;AAAA,KAxBKN,IAAyB;AA0B/B,eAAeA,IAAI;AAAC;AAAA"},"metadata":{},"sourceType":"module"}